package cn.stylefeng.guns.modular.business.frequency.transportsign.mapper;

import cn.stylefeng.guns.modular.business.frequency.ordersub.model.param.OrderDTO;
import cn.stylefeng.guns.modular.business.frequency.ordersub.model.result.OrderSignExport;
import cn.stylefeng.guns.modular.business.frequency.ordersub.model.result.PkgOrderSign;
import cn.stylefeng.guns.modular.business.frequency.ordertake.model.result.PkgTransportOrderDetail;
import cn.stylefeng.guns.modular.business.frequency.statistics.OrderSignVO;
import cn.stylefeng.guns.modular.business.frequency.transportsign.model.param.SignRecordDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.stylefeng.guns.modular.business.frequency.transportsign.entity.TransportSign;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 运单签收记录表 Mapper 接口
 *
 * @author yujie
 * @date 2023/05/09 17:15
 */
public interface TransportSignMapper extends BaseMapper<TransportSign> {

    PkgOrderSign getDeliverySignByOrderId(@Param("orderId") Long orderId);

    PkgOrderSign getPkgOrderSignByOrderIdAndTransportId(@Param("transportId") Long transportId, @Param("orderId")Long orderId);

    PkgOrderSign getLastSignInfoByOrderId(@Param("orderId") Long orderId);

    /** 待签收列表 */
    Page<OrderSignVO> getWaitSignOrderList(@Param("page") Page<Object> page, @Param("orderDTO") OrderDTO orderDTO);
    Long getWaitSignOrderListNum(@Param("orderDTO") OrderDTO orderDTO);

    int countByOrderId(@Param("orderId") Long orderId);

    Page<PkgOrderSign> getSignRecord(@Param("page") Page<Object> page, @Param("orderDTO") SignRecordDTO orderDTO);

    List<PkgOrderSign> getExportSignRecord(@Param("orderDTO") SignRecordDTO orderDTO);

}